<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>天天生鲜-首页</title>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script type="text/javascript" src="vue.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <link rel="stylesheet" type="text/css" href="css/reset.css">
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui.min.js"></script>
    <script type="text/javascript" src="js/slide.js"></script>
    <style>
        body{font-family:'Microsoft Yahei';font-size:12px;color:#666;}
        html,body{height:100%}
        /* 顶部样式 */
        .header_con{
            background-color:#f7f7f7;
            height:29px;
            border-bottom:1px solid #dddddd
        }

        .header{
            width:1200px;
            height:29px;
            margin:0 auto;
        }

        .welcome,.login_info,.login_btn,.user_link{
            line-height:29px;
        }

        .login_info{
            display:none;
        }

        .login_info em{color:#ff8800}

        .login_btn a,.user_link a{
            color:#666;
        }

        .login_btn a:hover,.user_link a:hover{
            color:#ff8800;
        }

        .login_btn span,.user_link span{
            color:#cecece;
            margin:0 10px;
        }


        /* logo、搜索框、购物车样式 */

        .search_bar{width:1200px;height:115px;margin:0 auto;}
        .logo{width:150px;height:59px;margin:29px 0 0 17px;}

        .search_con{width:578px;height:37px;border:1px solid #37ab40;margin:34px 0 0 124px;background:url(../images/icons.png) 10px -338px no-repeat;}
        .search_con .input_text{width:477px;height:36px;border:0px;margin:0px 0 0 0px;outline:none;font-size:12px;color:#737272;font-family:'Microsoft Yahei'}

        .search_con .input_btn{
            width:100px;height:38px;background-color:#37ab40;border:0px;font-size:14px;color:#fff;font-family:'Microsoft Yahei';outline:none;cursor:pointer;
        }

        .guest_cart{
            width:200px;height:40px;margin-top:34px;
        }

        .guest_cart .cart_name{
            width:158px;height:38px;line-height:38px;border:1px solid #dddddd;display:block;background:url(../images/icons.png) 13px -300px no-repeat;font-size:14px;color:#37ab40;text-indent:56px;
        }

        .guest_cart .goods_count{
            width:40px;height:40px;text-align:center;line-height:40px;font-size:18px;
            font-weight:bold;color:#fff;background-color:#ff8800;
        }


        /* 菜单、幻灯片样式 */

        .navbar_con{height:40px;border-bottom:2px solid #39a93e}
        .navbar{width:1200px;margin:0 auto;}
        .navbar h1{width:200px;height:40px;line-height:40px;text-align: center;font-size:14px;color:#fff;background-color:#39a93e;}

        .navbar .subnav_con{width:200px;height:40px;background-color:#39a93e;position:relative;cursor:pointer;}

        .navbar .subnav_con h1{position:absolute;left:0;top:0;text-align:left;text-indent:40px}
        .navbar .subnav_con span{display:block;width:16px;height:9px;background:url(image/images/down.png) no-repeat;position:absolute;right:27px;top:16px;transition:all 300ms ease-in;
        }

        .navbar .subnav_con:hover span{transform:rotateZ(180deg)}

        .navbar .subnav_con .subnav{position:absolute;left:0;top:40px;display:none;border-top:2px solid  #39a93e;}
        .navbar .subnav_con:hover .subnav{display:block;}


        .navlist{margin-left:34px;}
        .navlist li{height:40px;float:left;line-height:40px;}
        .navlist li a{color:#666;font-size:14px}
        .navlist li a:hover{color:#ff8800}
        .navlist .interval{margin:0 15px;}


        .center_con{width:1200px;height:270px;margin:0 auto;}
        .subnav{width:198px;height:270px;border-left:1px solid #eee;border-right:1px solid #eee;}
        .subnav li{height:33px;border-bottom:1px solid #eee;background:url(image/images/icons.png) 178px -257px no-repeat #fff;}

        .subnav li a{display:block;height:30px;line-height:30px;text-indent:71px;font-size:14px;color:#333}
        .subnav li a:hover{color:#ff8800}

        .subnav li .sea{background:url(image/images/icons.png) 28px 0px no-repeat;}
        .subnav li .fruit{background:url(image/images/icons.png) 28px -43px no-repeat;}
        .subnav li .greens{background:url(image/images/icons.png) 28px -86px no-repeat;}
        .subnav li .oil{background:url(image/images/icons.png) 28px -132px no-repeat;}
        .subnav li .egg{background:url(image/images/icons.png) 28px -174px no-repeat;}
        .subnav li .dried{background:url(image/images/icons.png) 28px -220px no-repeat;}
        .subnav li .meat{background:url(image/images/icons.png) 28px -174px no-repeat;}
        .subnav li .native{background:url(image/images/icons.png) 28px -220px no-repeat;}


        .slide{width:760px;height:270px;position:relative;overflow:hidden;}
        .slide .slide_pics{position:relative;left:0;top:0;width:760px;height:270px;}
        .slide .slide_pics li{width:760px;height:270px;position:absolute;left:0;top:0}
        .slide .prev,.slide .next{width:17px;height:23px;background:url(image/images/icons.png) left -388px no-repeat;position:absolute;left:11px;top:122px;cursor:pointer;}
        .slide .next{background-position:left -428px;left:732px;}
        .points{width:100%;height:11px;position:absolute;left:0;top:250px;text-align:center;}
        .points li{display:inline-block;width:11px;height:11px;margin:0 5px;background-color:#9f9f9f;border-radius:50%;cursor:pointer;}
        .points li.active{background-color:#cecece}

        .adv{width:240px;height:270px; overflow:hidden; background-color:gold;}
        .adv a{display:block;float:left;}


        /* 商品列表样式 */

        .list_model{width:1200px;height:340px;margin:15px auto 0;}
        .list_title{height:40px;border-bottom:2px solid #42ad46}
        .list_title h3{height:40px;line-height:40px;font-size:16px;color:#37ab40;font-weight:bold;}
        .list_title .subtitle{height:20px;line-height:20px;margin-top:15px;}
        .list_title .subtitle span{color:#666;margin:0 10px 0 20px;}
        .list_title .subtitle a{color:#666;margin:0 5px;}
        .list_title .subtitle a:hover,.goods_more:hover{color:#ff8800}
        .goods_more{height:20px;margin-top:15px;color:#666}

        .goods_con{height:300px;}
        .goods_banner{width:200px;height:300px;}
        .goods_banner img{width:200px;height:300px;}

        .goods_list{width:1000px;height:299px;border-bottom:1px solid #ededed}
        .goods_list li{height:299px;width:249px;border-right:1px solid #ededed;float:left}
        .goods_list li:hover{width:248px;height:297px;border:1px solid gold;}
        .goods_list li:hover img{opacity:0.8}

        .goods_list li h4{width:200px;height:50px;margin:20px auto 0;text-align:center;}
        .goods_list li h4 a{font-size:14px;color:#666;font-weight:normal;line-height:24px;}
        .goods_list li h4 a:hover{color:#ff8800}

        .goods_list li img{display:block;width:180px;height:180px;margin:0 auto;}
        .goods_list li .prize{text-align:center;font-size:20px;color:#c40000;margin-top:5px;}

        /* 页面底部样式 */
        .footer{
            border-top:2px solid #42ad46;
            margin:30px 0;
        }

        .foot_link{text-align:center;margin-top:30px;}
        .foot_link a,.foot_link span{color:#4e4e4e;}
        .foot_link a:hover{color:#ff8800}
        .foot_link span{padding:0 10px}
        .footer p{text-align:center; margin-top:10px;}


        /* 二级页面面包屑导航 */
        .breadcrumb{
            width:1200px;height:40px;margin:0 auto;
        }
        .breadcrumb a{line-height:40px;color:#37ab40}
        .breadcrumb a:hover{color:#ff8800}
        .breadcrumb span{line-height:40px;color:#666;padding:0 5px;}


        .main_wrap{width:1200px;margin:0 auto;}
        .l_wrap{width:200px;}
        .r_wrap{width:980px;}


        /* 新品推荐样式 */

        .new_goods{
            border:1px solid #ededed;
            border-top:2px solid #37ab40;
            padding-bottom:10px;
        }

        .new_goods h3{
            height:33px;line-height:33px;background-color:#fcfcfc;border-bottom:1px solid #ededed;font-size:14px;font-weight:normal;text-indent:10px;
        }

        .new_goods ul{width:160px;margin:0 auto;overflow:hidden;}
        .new_goods li{border-bottom:1px solid #ededed;margin-bottom:-1px;}
        .new_goods li img{display:block;width:150px;height:150px;margin:10px auto;}
        .new_goods li h4{width:160px;margin:0 auto;}
        .new_goods li h4 a{font-weight:normal;color:#666;display:block;width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
        .new_goods li .prize{font-size:14px;color:#da260e;margin:10px auto;}



        /* 商品列表样式 */

        .sort_bar{height:30px;background-color:#f0fdec}
        .sort_bar a{display:block;height:30px;line-height:30px;padding:0 20px;float:left;color:#000}
        .sort_bar .active{background-color:#37ab40;color:#fff;}


        .goods_type_list{
            margin:10px auto 0;
        }

        .goods_type_list li{
            width:196px;
            float:left;
            margin-bottom:10px
        }

        .goods_type_list li img{width:160px;height:160px;display:block;margin:10px auto;}
        .goods_type_list li h4{width:160px;margin:0 auto;}
        .goods_type_list li h4 a{font-weight:normal;color:#666;display:block;width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
        .operate{width:160px;margin:10px auto;position:relative;}
        .goods_type_list .operate .prize{color:#da260e; font-size:14px;}
        .goods_type_list .operate .unit{color:#999;padding-left:5px;}
        .goods_type_list .operate .add_goods{display:inline-block;width:15px;height:15px;background:url(../images/shop_cart.png);position:absolute;right:0;top:3px;}


        /* 分页样式 */

        .pagenation{height:32px;text-align:center;font-size:0;margin:30px auto;}
        .pagenation a{display:inline-block;border:1px solid #d2d2d2;background-color:#f8f6f7;font-size:12px;padding:7px 10px;color:#666;margin:5px}

        .pagenation .active{background-color:#fff;color:#43a200}





        /* 把标签默认的间距设为0 */
        body,ul,ol,p,h1,h2,h3,h4,h5,h6,dl,dd,select,input,textarea,form{margin:0;padding:0}

        /* 让h标签文字大小继承body的文字设置 */
        h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}

        /* 去掉列表默认的图标 */
        ul,ol{list-style:none;}

        /* 去掉em默认的斜体 */
        em{font-style: normal;}

        /* 去掉a标签默认的下划线 */
        a{text-decoration:none;}


        /* 去掉加链接时产生的框线 */
        img{border:0;}

        /* 清除浮动 */
        .clearfix:before,.clearfix:after{content:"";display:table}
        .clearfix:after{clear:both;}
        .clearfix{zoom:1}

        /* 浮动 */
        .fl{float:left}
        .fr{float:right}

    </style>
</head>
<body style="background: linear-gradient(45deg,lightblue,lightgray);">
<div id="app">
    <div class="header_con">
        <div class="header">
            <div class="welcome fl">欢迎来到菜先生!</div>
            <div class="fr">
                <!--<div class="login_info fl">
                    欢迎您：<em>张 山</em>

                </div>-->
                <div class="login_btn fl">
                    <a href="userLogin.html">登录</a>
                    <span>|</span>
                    <a href="userRegister.html">注册</a>
                </div>
                <div class="user_link fl">
                    <span>|</span>
                    <a @click="business()">商家中心</a>
                    <span>|</span>
                    <a @click="message()">消息中心</a>
                    <span>|</span>
                    <a @click="isLogin()">用户中心</a>
                    <span>|</span>
                    <a @click="myShop()">我的购物车</a>
                    <span>|</span>
                    <a @click="isLogin()">我的订单</a>
                </div>
            </div>
        </div>
        <!--<div class="jumbotron">
            <h1>欢迎来到菜先生!</h1>
            <p>精品果蔬,鲜嫩好物,任君挑选</p>
        </div>-->

        <div class="search_bar clearfix">
            <a href="index.html" class="logo fl"style="margin-left: 60px"><img src="image/logo.jpg" width="80px" height="80px" style="color: #9bd2e7;border-radius: 60px"></a>
            <!--<div class="search_con fl">
                <input type="text" v-model="info.name" class="input_text fl" name="name" placeholder="搜索商品">
                <input type="button" class="input_btn fr" name="" value="搜索" @click="getGoods(info.name)">
            </div>-->

        </div>

        <div class="navbar_con">
            <div class="navbar">
                <h1 class="fl">全部商品分类</h1>
                <ul class="navlist fl">
                    <li>多种分类</li>
                    <li class="interval">|</li>
                    <li>多样选择</li>
                    <li class="interval">|</li>
                    <li>任君挑选</li>
                </ul>
            </div>
        </div>

        <div class="center_con clearfix">
            <ul class="subnav fl">
                <li><a href="#model01" class="sea">海鲜水产</a></li>
                <li><a href="#model02" class="fruit">香甜水果</a></li>
                <li><a href="#model03" class="greens">有机蔬菜</a></li>
                <li><a href="#model04" class="oil">粮油专区</a></li>
                <li><a href="#model05" class="egg">禽蛋直达</a></li>
                <li><a href="#model06" class="dried">滋补干货</a></li>
                <li><a href="#model07" class="meat">冷鲜肉区</a></li>
                <li><a href="#model08" class="native">各地土产</a></li>
            </ul>
            <div class="slide fl">
                <ul class="slide_pics">
                    <li><a href="#model03" class="greens"><img src="image/images/slide.jpg" alt="幻灯片"></a></li>
                    <li><a href="#model02" class="fruit"><img src="image/images/slide02.jpg" alt="幻灯片"></a></li>
                    <li><a href="#model07" class="meat"><img src="image/images/slide03.jpg" alt="幻灯片"></a></li>
                    <li><a href="#model01" class="sea"><img src="image/images/slide04.jpg" alt="幻灯片"></a></li>
                </ul>
                <div class="prev"></div>
                <div class="next"></div>
                <ul class="points"></ul>
            </div>
            <div class="adv fl">
                <a href="#"><img src="image/images/adv01.jpg"></a>
                <a href="#"><img src="image/images/adv02.jpg"></a>
            </div>
        </div>

        <div class="list_model">
            <div class="list_title clearfix">
                <h3 class="fl" id="model01">海鲜水产</h3>
                <div class="subtitle fl">
                <span>|</span>
                龙虾 螃蟹 生蚝 种类齐全
                </div>

                <button  class="goods_more fr"  @click="more(1)" >查看更多 </button>
            </div>

            <div class="goods_con clearfix">
                <div class="goods_banner fl"><img src="image/images/banner01.jpg"></div>
                <ul class="goods_list fl">
                    <li v-for="(g,i) in seaGoodsListArr" :src= "g.img" :name="g.gname"  :sprice= "g.sprice":id="g.id" @click="detail(g.id)">
                        <h4 style="font-size:40px; "><a>{{g.gname}}</a></h4>
                        <a><img :src="g.img"></a>
                        <div class="price" style="text-align: center; font-size:15px; font-weight: bolder; color: red">￥{{g.sprice}}</div>
                        <div style="margin-left:25px; height: 20px; width: 180px;text-align: center; font-size:15px;font-weight: bolder;" >{{g.description}}</div>
                    </li>
                </ul>
            </div>
        </div>

        <div class="list_model">
            <div class="list_title clearfix">
                <h3 class="fl" id="model02">香甜水果</h3>
                <div class="subtitle fl">
                    <span>|</span>
                    葡梨浆果 多汁鲜物
                </div>
                <button  class="goods_more fr"  @click="more(2)">查看更多></button>
            </div>

            <div class="goods_con clearfix">
                <div class="goods_banner fl"><img src="image/images/banner02.jpg"></div>
                <ul class="goods_list fl">
                    <li v-for="(g,i) in fruitGoodsListArr" :src= "g.img" :name="g.gname"  :sprice= "g.sprice" :id="g.id" @click="detail(g.id)">
                        <h4 style="font-size:40px; "><a>{{g.gname}}</a></h4>
                        <a ><img :src="g.img"></a>
                        <div class="price" style="text-align: center; font-size:15px; font-weight: bolder; color: red">￥{{g.sprice}}</div>
                        <div style="margin-left:25px; height: 20px; width: 180px;text-align: center; font-size:15px;font-weight: bolder;" >{{g.description}}</div>
                    </li>
                </ul>
            </div>
        </div>

        <div class="list_model">
            <div class="list_title clearfix">
                <h3 class="fl" id="model03">有机蔬菜</h3>
                <div class="subtitle fl">
                    <span>|</span>
                    无公害 脆嫩 新鲜润胃
                </div>
                <button  class="goods_more fr" @click="more(3)">查看更多 ></button>
            </div>

            <div class="goods_con clearfix">
                <div class="goods_banner fl"><img src="image/images/banner03.jpg"></div>
                <ul class="goods_list fl">
                    <li v-for="(g,i) in greensGoodsListArr" :src= "g.img" :name="g.gname"  :sprice= "g.sprice" :id="g.id" @click="detail(g.id)">
                        <h4 style="font-size:40px; "><a >{{g.gname}}</a></h4>
                        <a ><img :src="g.img"></a>
                        <div class="price" style="text-align: center; font-size:15px; font-weight: bolder; color: red">￥{{g.sprice}}</div>
                        <div style="margin-left:25px; height: 20px; width: 180px;text-align: center; font-size:15px;font-weight: bolder;" >{{g.description}}</div>
                    </li>
                </ul>
            </div>
        </div>

        <div class="list_model">
            <div class="list_title clearfix">
                <h3 class="fl" id="model04">粮油专区</h3>
                <div class="subtitle fl">
                    <span>|</span>
                    非转基因 调和油 植物油
                </div>
                <button class="goods_more fr" @click="more(4)">查看更多 ></button>
            </div>

            <div class="goods_con clearfix">
                <div class="goods_banner fl"><img src="image/images/banner04.jpg"></div>
                <ul class="goods_list fl">
                    <li v-for="(g,i) in oilGoodsListArr" :src= "g.img" :name="g.gname"  :sprice= "g.sprice" :id="g.id" @click="detail(g.id)" >
                        <h4 style="font-size:40px; "><a >{{g.gname}}</a></h4>
                        <a><img :src="g.img"></a>
                        <div class="price" style="text-align: center; font-size:15px; font-weight: bolder; color: red">￥{{g.sprice}}</div>
                        <div style="margin-left:25px; height: 20px; width: 180px;text-align: center; font-size:15px;font-weight: bolder;" >{{g.description}}</div>
                    </li>
                </ul>
            </div>
        </div>

        <div class="list_model">
            <div class="list_title clearfix">
                <h3 class="fl" id="model05">禽蛋直达</h3>
                <div class="subtitle fl">
                    <span>|</span>
                    鸡蛋 鹌鹑蛋 流油海鸭蛋
                </div>
                <button  class="goods_more fr" @click="more(5)">查看更多 ></button>
            </div>

            <div class="goods_con clearfix">
                <div class="goods_banner fl"><img src="image/images/banner05.jpg"></div>
                <ul class="goods_list fl">
                    <li v-for="(g,i) in eggGoodsListArr" :src= "g.img" :name="g.gname"  :sprice= "g.sprice" :id="g.id" @click="detail(g.id)">
                        <h4 style="font-size:40px; "><a >{{g.gname}}</a></h4>
                        <a ><img :src="g.img"></a>
                        <div class="price" style="text-align: center; font-size:15px; font-weight: bolder; color: red">￥{{g.sprice}}</div>
                        <div style="margin-left:25px; height: 20px; width: 180px;text-align: center; font-size:15px;font-weight: bolder;" >{{g.description}}</div>
                    </li>
                </ul>
            </div>
        </div>

        <div class="list_model">
            <div class="list_title clearfix">
                <h3 class="fl" id="model06">滋补干货</h3>
                <div class="subtitle fl">
                    <span>|</span>
                    香菇 海带干黄花 鹿茸人参
                </div>
                <button  class="goods_more fr"  @click="more(6)">查看更多 ></button>
            </div>

            <div class="goods_con clearfix">
                <div class="goods_banner fl"><img src="image/images/banner06.jpg"></div>
                <ul class="goods_list fl">
                    <li v-for="(g,i) in driedGoodsListArr" :src= "g.img" :name="g.gname"  :sprice= "g.sprice" :id="g.id" @click="detail(g.id)" >
                        <h4 style="font-size:40px; "><a >{{g.gname}}</a></h4>
                        <a ><img :src="g.img"></a>
                        <div class="price" style="text-align: center; font-size:15px; font-weight: bolder; color: red">￥{{g.sprice}}</div>
                        <div style="margin-left:25px; height: 20px; width: 180px;text-align: center; font-size:15px;font-weight: bolder;" >{{g.description}}</div>
                    </li>
                </ul>
            </div>
        </div>

        <div class="list_model">
            <div class="list_title clearfix">
                <h3 class="fl" id="model07">冷鲜肉区</h3>
                <div class="subtitle fl">
                    <span>|</span>
                    猪肉 牛羊肉 进口菲力
                </div>
                <button  class="goods_more fr" @click="more(7)">查看更多 ></button>
            </div>

            <div class="goods_con clearfix">
                <div class="goods_banner fl"><img src="image/images/banner07.jpg"></div>
                <ul class="goods_list fl">
                    <li v-for="(g,i) in meatGoodsListArr" :src= "g.img" :name="g.gname"  :sprice= "g.sprice" :id="g.id" @click="detail(g.id)">
                        <h4 style="font-size:40px; "><a>{{g.gname}}</a></h4>
                        <a><img :src="g.img"></a>
                        <div class="price" style="text-align: center; font-size:15px; font-weight: bolder; color: red">￥{{g.sprice}}</div>
                        <div style="margin-left:25px; height: 20px; width: 180px;text-align: center; font-size:15px;font-weight: bolder;" >{{g.description}}</div>
                    </li>
                </ul>
            </div>
        </div>


        <div class="list_model">
            <div class="list_title clearfix">
                <h3 class="fl" id="model08">各地土产</h3>
                <div class="subtitle fl">
                    <span>|</span>
                    青团 川香腊肉 金华火腿
                </div>
                <button  class="goods_more fr"  @click="more(8)">查看更多 ></button>
            </div>

            <div class="goods_con clearfix">
                <div class="goods_banner fl"><img src="image/images/banner08.jpg"></div>
                <ul class="goods_list fl">
                    <li v-for="(g,i) in nativeGoodsListArr" :src= "g.img" :name="g.gname"  :sprice= "g.sprice" :id="g.id" @click="detail(g.id)">
                        <h4 style="font-size:40px; "><a>{{g.gname}}</a></h4>
                        <a ><img :src="g.img"></a>
                        <div class="price" style="text-align: center; font-size:15px;color: red">￥{{g.sprice}}</div>
                        <div style="margin-left:25px; height: 20px; width: 180px;text-align: center; font-size:10px;font-weight: bolder;" >{{g.description}}</div>
                    </li>
                </ul>
            </div>
        </div>
        <div style="height: 80px; line-height: 30px;background-color: #cbd4d7">
            <span style="margin-left: 300px">2021-现在 MrCai.com版权所有</span>
            <p style="margin-left: 690px">QY144菜先生线上平台</p>
        </div>
    </div>
</div>
    <script>
        var app = new Vue({
            el:"#app",
            data:{
                info:{},
                moreGoodsArr:[],
                seaGoodsListArr:[],
                fruitGoodsListArr:[],
                greensGoodsListArr:[],
                oilGoodsListArr:[],
                eggGoodsListArr:[],
                driedGoodsListArr:[],
                meatGoodsListArr:[],
                nativeGoodsListArr:[],
                queryGoodsArr:[]

            },
            methods:{
                message:function(){
                    $.get("/cai/consumer/businessLogin",function (backData) {
                        if (backData.code == 2) {
                            if (confirm("还未登录，请先进行登录")) {
                                window.location.href = "/cai/userLogin.html";
                            }
                        }
                    });
                },
                myShop:function(){
                    $.get("/cai/consumer/businessLogin",function (backData) {
                        if(backData.code == 2){
                            if(confirm("还未登录，请先进行登录")){
                                window.location.href = "/cai/userLogin.html";
                            }
                        }
                    });
                },
                getGoods:function(){
                    $.post("/cai/index/getGoods",app.info,function (backData) {
                        app.queryGoodsArr = backData.data;
                    })
                },
                isLogin:function(){
                    $.get("/cai/consumer/businessLogin",function (backData){
                            if(backData.code == 2){
                                if(confirm("还未登录，请先进行登录")){
                                    window.location.href = "/cai/userLogin.html";
                                }
                            }
                        }
                    );
                },
                detail:function(a){
                    window.location.href="/cai/detail.html?id="+a;
                },
                more:function(b){
                    window.location.href="/cai/more.html?id="+b;
                },

                login: function () {
                    window.location.href = "/cai/userLogin.html";
                },
                register:function () {
                    window.location.href = "/cai/userRegister.html";
                },
                business:function () {
                    $.get("/cai/consumer/businessLogin",function (backData) {
                        if(backData.code == 1){
                            window.location.href = "/cai/businessMain.html";
                        }else if(backData.code == 3){
                            window.location.href = "/cai/businessRegister.html";
                        }else{
                            if(confirm("还未登录，请先进行登录")){
                                window.location.href = "/cai/userLogin.html";
                            }
                        }
                    });
                }
            }
        });
        /*获取水产品商品信息的请求*/
        $.get("/cai/index/seaGoodsList",function (backData) {
            app.seaGoodsListArr = backData.data;
        });
        /*获取水果商品信息的请求*/
        $.get("/cai/index/fruitGoodsList",function (backData) {
            app.fruitGoodsListArr = backData.data;
        });
        /*获取蔬菜商品信息的请求*/
        $.get("/cai/index/greensGoodsList",function (backData) {
            app.greensGoodsListArr = backData.data;
        });
        /*获取粮油商品信息的请求*/
        $.get("/cai/index/oilGoodsList",function (backData) {
            app.oilGoodsListArr = backData.data;
        });
        /*获取禽蛋商品信息的请求*/
        $.get("/cai/index/eggGoodsList",function (backData) {
            app.eggGoodsListArr = backData.data;
        });

        /*获取干货商品信息的请求*/
        $.get("/cai/index/driedGoodsList",function (backData) {
            app.driedGoodsListArr = backData.data;
        });

        /*获取肉类商品信息的请求*/
        $.get("/cai/index/meatGoodsList",function (backData) {
            app.meatGoodsListArr = backData.data;
        });
        /*获取土产商品信息的请求*/
        $.get("/cai/index/nativeGoodsList",function (backData) {
            app.nativeGoodsListArr = backData.data;
        });


    </script>


</body>
</html>